home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / FredFish PD 319.adf / CNewsSrc / uupc.lzh / include / libc.h < prev    next >
C/C++ Source or Header  |  1989-06-30  |  3KB  |  91 lines

  1. #ifndef LIBC_H
  2. #define LIBC_H
  3. /*
  4.  * declarations of (supposedly) standard C library functions and types.
  5.  * we don't declare functions that once returned int but may now return void
  6.  * to avoid fatal but spurious compilation errors.  VOID is an attempt to
  7.  * deal with this transition.  sprvalue is similar.
  8.  *
  9.  * The function declarations need to be prototyped to give ANSI compilers
  10.  * less gastric distress.
  11.  */
  12.  
  13. #include <time.h>                            /* Should be ifdef'd somehow!? */
  14.  
  15. #ifndef VOID
  16. #  define VOID void
  17. #endif
  18.  
  19. #ifndef sprvalue
  20. /*#define sprvalue char *                    /* for stupid archaic 4BSD */
  21. #  define sprvalue int
  22. #endif
  23.  
  24. /* Unix system calls */
  25. /* signal types: tailor to suite local tastes */
  26. typedef VOID (*sigret_t)();
  27. typedef VOID (*sigarg_t)();
  28.  
  29. #ifdef A_STABLE_WORLD
  30. extern VOID _exit();
  31. extern int access(), chown(), fork(), link();
  32. extern int mkdir(), umask(), unlink(), wait();
  33. extern int alarm();                                    /* really unsigned? */
  34. extern int getuid(), geteuid(), getgid(), getegid();
  35. extern int setuid(), setgid();
  36. extern int gethostname();
  37. extern int execv(), execl(), execve(), execle();
  38. #endif    /* A_STABLE_WORLD */
  39.  
  40. extern char *ctime();                                    /* time.h */
  41. extern time_t time();                                    /* sys/timeb.h? */
  42. extern int errno;                                        /* errno.h */
  43. extern char **environ;
  44.  
  45. /* C library */
  46. #ifdef A_STABLE_WORLD
  47. extern int strcmp(), strncmp(), strlen();                /* strings.h */
  48. #endif    /* A_STABLE_WORLD */
  49.  
  50. extern char *strcpy(), *strcat(), *strncpy(), *strncat();    /* strings.h */
  51. extern char *index(), *rindex();                        /* strings.h */
  52. extern char *memcpy();                                    /* memory.h */
  53.  
  54. #ifdef A_STABLE_WORLD
  55. extern int fflush(), fputs(), ungetc();                    /* stdio.h */
  56. extern int fread(), fwrite(), fseek();                    /* stdio.h */
  57. extern int pclose();                                    /* stdio.h */
  58. extern VOID rewind();                                    /* stdio.h */
  59. extern VOID exit();                                        /* stdio.h */
  60. #endif    /* A_STABLE_WORLD */
  61.  
  62. extern FILE *popen();                                    /* stdio.h */
  63.  
  64. #ifdef __STDC__
  65. extern int printf(char *fmt, ...);                        /* stdio.h */
  66. extern int fprintf(FILE *, char *fmt, ...);                /* stdio.h */
  67. extern sprvalue sprintf(char *buf, char *fmt, ...);        /* stdio.h */
  68. #else    /* __STDC__ */
  69. extern int printf(), fprintf();                            /* stdio.h */
  70. extern sprvalue sprintf();                                /* stdio.h */
  71. #endif    /* __STDC__ */
  72.  
  73. /* these unfortunately cannot be relied upon to be in the right header */
  74. extern struct passwd *getpwnam();                        /* pwd.h */
  75. extern struct group *getgrnam();                        /* grp.h */
  76.  
  77. extern long atol();
  78. extern char *mktemp();
  79. extern char *getenv();
  80.  
  81. #ifdef A_STABLE_WORLD
  82. extern int putenv(), system();
  83. extern int getopt();
  84. #endif    /* A_STABLE_WORLD */
  85.  
  86. extern int optind;
  87. extern char *optarg;
  88.  
  89. #include "alloc.h"                                        /* ugh */
  90. #endif    /* LIBC_H */
  91.